<?php
$vkId = $_GET['vkId'];
include_once("php/ErrorHandler.php");
include_once("php/DbManager.php");
include_once("php/DbBridge.php");
ErrorHandler::setErrorHandling();
$db = new DbBridge();
$dbManager = new DbManager();
$db->connect();
$userExists = $dbManager->userExistsByVkId($db, $vkId);
if ($userExists === '1') {
	echo "1";
} elseif ($userExists === '') {
	echo "0";
} elseif ($userExists) {
	echo $userExists;
} else {
	echo "0";
}
$db->disconnect();
?>